home *** CD-ROM | disk | FTP | other *** search
/ PC Graphics Unleashed / PC Graphics Unleashed.iso / ch17 / pi / revolve / revolve.pi < prev   
Encoding:
Text File  |  1994-08-05  |  1.7 KB  |  94 lines

  1. // Scene File: REVOLVE.PI
  2. // Author:  Rob McGregor
  3.  
  4. // The camera revolves around two stone pillars in the desert
  5.  
  6. include "..\..\..\colors.inc"
  7. include "..\..\..\texture.inc"
  8. include "..\..\..\stones.inc"
  9.  
  10. // Define the range of the animation
  11. start_frame  0
  12. end_frame    59
  13. total_frames 60
  14. outfile "rev"
  15.  
  16. // Give the location of points
  17. define pi 3.14159265358
  18. define ang ((2 * pi) / total_frames) * frame
  19.  
  20. // Define the position of the camera
  21. define newX 10 * cos(ang)
  22. define newZ 10 * sin(ang)
  23. define loc1 <newX, -1.5, newZ>
  24.  
  25. // Lights
  26. light <-5, 3, -10>
  27. light <8, 4, -15>
  28. light <2, 10, -5>
  29. directional_light <2, 0, 15>
  30.  
  31. // Set up the camera
  32. viewpoint {
  33.   from       loc1
  34.   at         <0, 0, 0>
  35.   up         <0, 1, 0>
  36.   angle      45
  37.   resolution 320, 200
  38.   aspect     1.6
  39. }
  40.  
  41. // Set the sky color and add a little haze
  42. background Grey
  43. haze 0.98, 25, Grey
  44.  
  45. // Create some pillars
  46. define pillar1
  47. object {
  48.   object {
  49.     cylinder <0, -2.5, 0>, <0, 2.5, 0>, 0.5
  50.     translate <-1.6, -1.2, 0>
  51.   } 
  52. +
  53.   object {
  54.     sphere <-1.6, 1.5, 0>, 1
  55.   } 
  56.   Tigers_Eye1 { scale <2, 2, 2> }
  57. }
  58. object { pillar1 }
  59.  
  60. define pillar2
  61. object {
  62.   object {
  63.     cylinder <0, -2.5, 0>, <0, 2.5, 0>, 0.5
  64.     translate <1.6, -1.2, 0>
  65.   } 
  66. +
  67.   object {
  68.     sphere <1.6, 1.5, 0>, 1
  69.   }
  70.   white_marble { scale <0.25, 0.25, 0.25> }
  71. }
  72. object { pillar2 }
  73.  
  74. // Create a desert wasteland
  75. define sand_dunes
  76. texture {
  77.   noise surface {
  78.     color <0.85, 0.75, 0.69>
  79.     normal 2
  80.     frequency 100
  81.     bump_scale 1.5
  82.     ambient 0.37
  83.     diffuse 0.75
  84.   }
  85. }
  86. object {
  87.   disc <0, 0, 0>, <0, 1, 0>, 10000
  88.   sand_dunes { scale <92, 92, 92> }
  89.   rotate <0, 10, 0>
  90.   translate <0, -3.5, 0>
  91. }
  92.  
  93.  
  94.